//
//  Globals.swift
//  SmartPenSwift
//
//  Created by tql on 2021/2/3.
//

import Foundation
import UIKit


let kScreenWidth : CGFloat = UIScreen.main.bounds.size.width
let kScreenHeight : CGFloat = UIScreen.main.bounds.size.height

let IS_PAD : Bool = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad ? true : false)


func IS_IPHONEX() -> Bool{
    var isPhoneX = false
    if #available(iOS 11.0, *) {
        guard let window =  (UIApplication.shared.delegate?.window)  else {
            return isPhoneX
        }
        isPhoneX = window!.safeAreaInsets.bottom  > 0 ? true : false
    }
    return isPhoneX
}

let NavBarHeight  : CGFloat  = IS_IPHONEX() ? 88 : 64
let TabBarHeight  : CGFloat =  IS_IPHONEX() ? 83 : 49

//#define kBottomSafeHeight   (CGFloat)(IS_IPHONEX?(34):(0))
let kBottomSafeHeight  : CGFloat =  IS_IPHONEX() ? 34 : 0

let STATUSBAR_HEIGHT  : CGFloat =  IS_IPHONEX() ? 44 : 20

enum NotificationCase {
    case AutoSaveLog
    case StrokePen
    case NeedFilter
}



let kAutoSaveLog : String = "kAutoSaveLog"
let kStrokePen : String = "kStrokePen"
let kNeedFilter : String = "kNeedFilter"
